package com.ngc.mall.core.enumeration;

import java.util.stream.Stream;

/**
 *
 * 菜单类型
 * @author: chenxiaolin
 * @date 2023/11/9 9:40
**/

public enum MenuType {
    FOLDER(1,"文件夹"),
    MENU(2,"菜单"),
    PERMISSION(3,"按钮");

    private Integer value;

    MenuType(int value,String description) {
        this.value=value;
    }

    public Integer getValue(){
        return this.value;
    }

    public static MenuType toType(int value){
        return Stream.of(MenuType.values()).filter(c->c.value==value).findAny().orElse(null);
    }
}
